{% extends 'myhome/index.html' %}
{% block title %}
<title>天天生鲜-个人中心</title>
{% endblock %}
{% block main %}
	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="{% url 'myhome_order_manage' %}" class="active">· 个人信息</a></li>
				<li><a href="{% url 'myhome_order_order' %}">· 全部订单</a></li>
				<li><a href="{% url 'myhome_order_addrIndex' %}">· 收货地址</a></li>
			</ul>
		</div>
		<div class="right_content clearfix">
				<div class="info_con clearfix" style="">
				<h3 class="common_title2">基本信息</h3>
						<ul class="user_info_list">
							
							<li class="name"><span style="margin-right: 17px">用户名：</span>
								<em>{{user.username}}</em>
							</li>
							<li class="phone"><span style="display: inline-block;width: 110px;margin-left: 6px;text-align: left;">联系方式：</span>
								<em>{{user.phone}}</em>
							</li>
		
						</ul>
				</div>

				<script type="text/javascript">
					$(".user_info_list li").dblclick(function(){
						if($(this).attr("class") != "phone"){
							li1 = $(this).find("em").text()
							$(this).append("<input value="+li1+"></input>")
							$(this).find("input").select()
							li1 = $(this).find("em").hide()
							el = $(this)
							bj = $(this).attr("class")
							$(this).find("input").blur(function(){
								el1 = $(this)
								$.get('{% url 'myhome_info_update' %}',{"data":$(this).val(),"bj":bj},function(data){
										el.find("em").text(el1.val()).show()
										el.find("input").remove()
										location.reload()   
								})
							})
						}
					})
				</script>
				<h3 class="common_title2">最近浏览</h3>
				<div class="has_view_list">
					<ul class="goods_type_list clearfix">
				<li>
					<a href="detail.html"><img src="/static/myhome/images/goods/goods003.jpg"></a>
					<h4><a href="detail.html">大兴大棚草莓</a></h4>
					<div class="operate">
						<span class="prize">￥16.80</span>
						<span class="unit">16.80/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>

				<li>
					<a href="#"><img src="/static/myhome/images/goods/goods004.jpg"></a>
					<h4><a href="#">吐鲁番梨光杏</a></h4>
					<div class="operate">
						<span class="prize">￥5.50</span>
						<span class="unit">5.50/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>

				<li>
					<a href="#"><img src="/static/myhome/images/goods/goods005.jpg"></a>
					<h4><a href="#">黄肉桃</a></h4>
					<div class="operate">
						<span class="prize">￥10.00</span>
						<span class="unit">10.00/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>

				<li>
					<a href="#"><img src="/static/myhome/images/goods/goods006.jpg"></a>
					<h4><a href="#">进口西梅</a></h4>
					<div class="operate">
						<span class="prize">￥28.80</span>
						<span class="unit">28.8/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>

				<li>
					<a href="#"><img src="/static/myhome/images/goods/goods007.jpg"></a>
					<h4><a href="#">香梨</a></h4>
					<div class="operate">
						<span class="prize">￥6.45</span>
						<span class="unit">6.45/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
			</ul>
		</div>
		</div>
	</div>


{% endblock %}